package view.GUI.adminView.coreData.people;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import model.data.interfaces.IFinishable;

import org.controlsfx.validation.ValidationSupport;

import enums.GUIText;
import javafx.scene.Node;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.ToggleButton;

public class EditBox{

	private Label lblPerson;
	private ComboBox<IFinishable> cmbPerson;
	private ToggleButton toggleDelete;
	private List<Node> nodeList;
	
	public EditBox(ValidationSupport valSup, GUIText labelText, Collection<? extends IFinishable> cmbItems){
		lblPerson = new Label(labelText.toString());
		cmbPerson = new ComboBox<>();
		cmbPerson.getItems().addAll(cmbItems);
		toggleDelete = new ToggleButton();
		nodeList = new ArrayList<>();
		nodeList.add(lblPerson);
		nodeList.add(cmbPerson);
		nodeList.add(toggleDelete);
	}
	
	public ComboBox<IFinishable> getComboBox(){
		return cmbPerson;
	}
	
	public boolean isDeleteSelected(){
		return toggleDelete.isSelected();
	}
	
	public List<Node> getNodes(){
		return nodeList;
	}
	
}
